import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';


import { AppComponent } from './app.component';
import {RouterModule, Routes} from '@angular/router';
import { Code404Component } from './code404/code404.component';

const appRoutes: Routes = [
  {path: '', redirectTo: '/design', pathMatch: 'full'},
  {path: 'design', loadChildren: './design/design.module#DesignModule'},
  {path: 'test', loadChildren: './test/test.module#TestModule'},
  {path: 'front', loadChildren: './front/front.module#FrontModule'},
  {path: 'back', loadChildren: './back/back.module#BackModule'},
  {path: '**', component: Code404Component}
];

@NgModule({
  declarations: [
    AppComponent,
    Code404Component
  ],
  imports: [
    BrowserModule,
    RouterModule.forRoot(appRoutes)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
